#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

if git diff --cached --name-only | grep '^src/FE/' >/dev/null; 
then
    if ! (cd src/FE && npm run build); then
        echo "The front-end build failed."
        exit 1
    fi
fi

exit 0